import store from '@/store'
const utilsFunc = {
    inserted(value) {
        if (value && value instanceof Array && value.length > 0) {
            var menus = store.getters && store.getters.permissions
            const permissionMenus = value
            if(menus!=null){
                const hasPermission = menus.some(menu => {
                    return permissionMenus.includes(menu)
                })
                if (!hasPermission) {
                    return false
                }
                return true
            }
        } else {
            return false
        }
    }
}

export default utilsFunc
